import request from '../utils/request'
import { HttpMethod } from '../utils/http'

export default {
  // 获取当前客户登录信息
  getInfo () {
    return request({
      url: '/beauty/member/getInfo',
      method: HttpMethod.GET
    })
  },
  // 支付宝充值金额
  topUpWithAlipay (memberId, amount) {
    const data = {
      memberId,
      amount
    }
    return request({
      url: `/beauty/member/alipay/topUp`,
      method: HttpMethod.PUT,
      data
    })
  },
  // 更新客户头像
  updateMemberAvatar (data) {
    return request({
      url: '/beauty/member/updateMemberAvatar',
      method: HttpMethod.PUT,
      data
    })
  },
  // 修改密码
  updateMemberPassword (data) {
    return request({
      url: '/beauty/member/updateMemberPassword',
      method: HttpMethod.PUT,
      data
    })
  },
  // 完善客户信息
  perfectMemberInfo (data) {
    return request({
      url: '/beauty/member/perfectMemberInfo',
      method: HttpMethod.PUT,
      data
    })
  },

  // 修改基本资料
  updateMemberBasicInfo (data) {
    return request({
      url: '/beauty/member/updateMemberBasicInfo',
      method: HttpMethod.PUT,
      data
    })
  },
}
